package com.kotlin.android.router

import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.launcher.ARouter

/**
 * 创建者: zl
 * 创建时间: 2020/6/5 10:35 AM
 * 描述:
 */
object RouterUtils {
//    /**
//     * 根据path返回Activity对象
//     */有问题
//    fun getActivity(path: String): Activity {
//        return ARouter.getInstance().build(path).navigation() as Activity
//    }

    /**
     * 根据path返回Fragment对象
     */
    fun getFragment(path: String): Fragment {
        return ARouter.getInstance().build(path).navigation() as Fragment
    }
}